<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>账户信息</title>
	<script src="/static/mobile/js/mui.min.js"></script>
	<link href="/static/mobile/css/mui.min.css" rel="stylesheet"/>
	<link rel="stylesheet" type="text/css" href="/static/mobile/css/basic.css"/>
	<link rel="stylesheet" type="text/css" href="/static/mobile/css/resiter_daili_3.css"/>
	<script type="text/javascript" src="/static/mobile/js/jquery.js"></script>
	<link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
	<script type="text/javascript" charset="utf-8">
        mui.init();
	</script>
	<style>
		.section2 .sub button {
			width: 100%;
			padding: 5px;
			font-size: 1rem;
			color: #fff;
			background: #E52D2D;
			border-color: #E52D2D;
		}
	</style>
</head>
<body>
<div class="sectionx">
	<header class="mui-bar mui-bar-nav" >
		<a class="mui-icon mui-icon-left-nav mui-pull-left" href="javascript:history.back(-1)" style="color: #4E4E4E;"></a>
		<h1 class="mui-title">个人信息</h1>
		<!--<a class="mui-icon mui-icon  mui-pull-right right1" href="pay_record.html" style="color: #4E4E4E;font-size: 0.8rem;padding-top: 18px;">转账记录</a>-->
	</header>
</div>
<div class="layui-form">
	<form  method="post">
		<div class="section3">
			<div class="container">
				<p>银行账户信息</p>
			</div>
		</div>
		<div class="section2">

			<ul>
				<li class="lix mui-clearfix">
					<span>开户银行</span>
					<input type="text" placeholder="请输入开户银行" name='bank_name' value='{$user.bank_name}'/>
					<span class="xing">*</span>
				</li>

				<li class="lix mui-clearfix">
					<span>开户姓名</span>
					<input type="text" placeholder="请输入开户姓名" name='username'  value='{$user.username}'/>
					<span class="xing">*</span>
				</li>
				<li class="lix mui-clearfix">
					<span>开户账号</span>
					<input type="text" placeholder="请输入开户银行账号" name='bank_card' value='{$user.bank_card}'/>
					<span class="xing">*</span>
				</li>
				<li class="lix mui-clearfix">
					<span>开户地址</span>
					<input type="text" placeholder="请输入开户地址" name='bank_dizhi' value='{$user.bank_dizhi}'/>
					<span class="xing">*</span>
				</li>
			</ul>
		</div>

		<div class="section3">
			<div class="container">
				<p>密码</p>
			</div>
		</div>
		<div class="section2">
			<ul>
				<li class="lix mui-clearfix">
					<span>一级密码</span>
					<input type="password" placeholder="请输入一级密码" name='password' value='{$user.password}'/>
					<span class="xing">*</span>
				</li>

				<li class="lix mui-clearfix">
					<span>二级密码</span>
					<input type="password" placeholder="请输入二级密码" name='twopassword'  value='{$user.twopassword}'/>
					<span class="xing">*</span>
				</li>
			</ul>
			<div class="ge"></div>
			<div class="sub">
				<button type="button" class="layui-btn" lay-filter="sub" lay-submit>保存</button>
			</div>
		</div>
	</form>
</div>
</body>
<script type="text/javascript" >
    mui('body').on( 'tap' , 'a' , function(){
        document.location.href=this.href;
    })
</script>

<script src="/static/plugins/layui/layui.js"></script>
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,$ = layui.jquery;
        // 登录提交监听
        form.on('submit(sub)', function (data) {
            var loading = layer.load(1, {shade: [0.1, '#fff']});
            $.post("{:url('mybank')}",data.field,function(res){
                layer.close(loading);
                if(res.code > 0){
                    layer.msg(res.msg,{time:1000,icon:1},function(){
                        location.href = "{:url('mybank')}";
                    });
                }else{
                    layer.msg(res.msg,{time:1000,icon:2});
                    // $('.captcha img').attr('src','{:url("verify")}?id='+Math.random());
                }
            });
        })
    })
</script>

</html>